varying vec3 N, L;

void main()
{
	const float specularExp = 128.0;
	vec3 NN = normalize(N);
	vec3 lightCol;
	lightCol = vec3(0.8,0.8,1.0);
	
  gl_FragColor=vec4(0.0);//gl_Color;

	vec3 NL = normalize( L );
	vec3 NH = normalize( NL +vec3(0.0,0.0,1.0) );
	float NdotL = max(0.0,dot(NN,NL));
	gl_FragColor.rgb += 1.0 * gl_Color.rgb *lightCol *NdotL;
	
	if( NdotL >0.0 )
		gl_FragColor.rgb += 1.0 * lightCol * pow(max(0.0,dot(NN,NH)),specularExp);
  
  gl_FragColor.rgb=clamp(gl_FragColor.rgb, 0.0, 1.0);
  
  //gl_FragColor=gl_Color;
  gl_FragColor.a = 1.0;
}



